package ca.cbc.mediacms.persistence;

import ca.cbc.medialib.dao.CategoryDAO;
import ca.cbc.medialib.entity.Category;

public class CategoryPersistence {
	private CategoryDAO categoryDAO;

	public CategoryDAO getCategoryDAO() {
		return categoryDAO;
	}

	public void setCategoryDAO(CategoryDAO categoryDAO) {
		this.categoryDAO = categoryDAO;
	}
	
	public Category findById(long id) {
		return categoryDAO.findById(id);
	}
	
	public Category findByFullTitle(String fullTitle) {
		return categoryDAO.findByField("fullTitle", fullTitle);
	}
}
